<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="同步轮材质" prop="tpMaterial">
        <el-input
          v-model="queryParams.tpMaterial"
          placeholder="请输入同步轮材质"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="同步轮齿形带宽" prop="tpToothBandwidth">
        <el-input
          v-model="queryParams.tpToothBandwidth"
          placeholder="请输入同步轮齿形带宽"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="同步轮齿数" prop="tpTeethNum">
        <el-input
          v-model="queryParams.tpTeethNum"
          placeholder="请输入同步轮齿数"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="同步轮形状" prop="tpShape">
        <el-input
          v-model="queryParams.tpShape"
          placeholder="请输入同步轮形状"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="PD" prop="tpPd">
        <el-input
          v-model="queryParams.tpPd"
          placeholder="请输入PD"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="OD" prop="tpOd">
        <el-input
          v-model="queryParams.tpOd"
          placeholder="请输入OD"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="mind" prop="tpMinD">
        <el-input
          v-model="queryParams.tpMinD"
          placeholder="请输入mind"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="maxd" prop="tpMaxD">
        <el-input
          v-model="queryParams.tpMaxD"
          placeholder="请输入maxd"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="D" prop="tpD">
        <el-input
          v-model="queryParams.tpD"
          placeholder="请输入D"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="F" prop="tpF">
        <el-input
          v-model="queryParams.tpF"
          placeholder="请输入F"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="E" prop="tpE">
        <el-input
          v-model="queryParams.tpE"
          placeholder="请输入E"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="t" prop="tpT">
        <el-input
          v-model="queryParams.tpT"
          placeholder="请输入t"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="DE" prop="tpDe">
        <el-input
          v-model="queryParams.tpDe"
          placeholder="请输入DE"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="AHd" prop="tpAhd">
        <el-input
          v-model="queryParams.tpAhd"
          placeholder="请输入AHd"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="APd" prop="tpApd">
        <el-input
          v-model="queryParams.tpApd"
          placeholder="请输入APd"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="APM" prop="tpApm">
        <el-input
          v-model="queryParams.tpApm"
          placeholder="请输入APM"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="ANd" prop="tpAnd">
        <el-input
          v-model="queryParams.tpAnd"
          placeholder="请输入ANd"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="ANM" prop="tpAnm">
        <el-input
          v-model="queryParams.tpAnm"
          placeholder="请输入ANM"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="ANb" prop="tpAnb">
        <el-input
          v-model="queryParams.tpAnb"
          placeholder="请输入ANb"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="ANt" prop="tpAnt">
        <el-input
          v-model="queryParams.tpAnt"
          placeholder="请输入ANt"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="ACd" prop="tpAcd">
        <el-input
          v-model="queryParams.tpAcd"
          placeholder="请输入ACd"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="ACM" prop="tpAcm">
        <el-input
          v-model="queryParams.tpAcm"
          placeholder="请输入ACM"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="ACb" prop="tpAcb">
        <el-input
          v-model="queryParams.tpAcb"
          placeholder="请输入ACb"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="ACt" prop="tpAct">
        <el-input
          v-model="queryParams.tpAct"
          placeholder="请输入ACt"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="AVd" prop="tpAvd">
        <el-input
          v-model="queryParams.tpAvd"
          placeholder="请输入AVd"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="AVZ" prop="tpAvz">
        <el-input
          v-model="queryParams.tpAvz"
          placeholder="请输入AVZ"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="AVJ" prop="tpAvj">
        <el-input
          v-model="queryParams.tpAvj"
          placeholder="请输入AVJ"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="AYd" prop="tpAyd">
        <el-input
          v-model="queryParams.tpAyd"
          placeholder="请输入AYd"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="AYQ" prop="tpAyq">
        <el-input
          v-model="queryParams.tpAyq"
          placeholder="请输入AYQ"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="AYR" prop="tpAyr">
        <el-input
          v-model="queryParams.tpAyr"
          placeholder="请输入AYR"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="AYS" prop="tpAys">
        <el-input
          v-model="queryParams.tpAys"
          placeholder="请输入AYS"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="AYT" prop="tpAyt">
        <el-input
          v-model="queryParams.tpAyt"
          placeholder="请输入AYT"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="AWBd" prop="tpAwbd">
        <el-input
          v-model="queryParams.tpAwbd"
          placeholder="请输入AWBd"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="AWBQ" prop="tpAwbq">
        <el-input
          v-model="queryParams.tpAwbq"
          placeholder="请输入AWBQ"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="AWBR" prop="tpAwbr">
        <el-input
          v-model="queryParams.tpAwbr"
          placeholder="请输入AWBR"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="AWBS" prop="tpAwbs">
        <el-input
          v-model="queryParams.tpAwbs"
          placeholder="请输入AWBS"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="AWBT" prop="tpAwbt">
        <el-input
          v-model="queryParams.tpAwbt"
          placeholder="请输入AWBT"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="BHd" prop="tpBhd">
        <el-input
          v-model="queryParams.tpBhd"
          placeholder="请输入BHd"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="BPd" prop="tpBpd">
        <el-input
          v-model="queryParams.tpBpd"
          placeholder="请输入BPd"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="BPM" prop="tpBpm">
        <el-input
          v-model="queryParams.tpBpm"
          placeholder="请输入BPM"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="BNd" prop="tpBnd">
        <el-input
          v-model="queryParams.tpBnd"
          placeholder="请输入BNd"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="BNM" prop="tpBnm">
        <el-input
          v-model="queryParams.tpBnm"
          placeholder="请输入BNM"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="BNb" prop="tpBnb">
        <el-input
          v-model="queryParams.tpBnb"
          placeholder="请输入BNb"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="BNt" prop="tpBnt">
        <el-input
          v-model="queryParams.tpBnt"
          placeholder="请输入BNt"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="BCd" prop="tpBcd">
        <el-input
          v-model="queryParams.tpBcd"
          placeholder="请输入BCd"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="BCM" prop="tpBcm">
        <el-input
          v-model="queryParams.tpBcm"
          placeholder="请输入BCM"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="BCb" prop="tpBcb">
        <el-input
          v-model="queryParams.tpBcb"
          placeholder="请输入BCb"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="BCt" prop="tpBct">
        <el-input
          v-model="queryParams.tpBct"
          placeholder="请输入BCt"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="BVd" prop="tpBvd">
        <el-input
          v-model="queryParams.tpBvd"
          placeholder="请输入BVd"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="BVZ" prop="tpBvz">
        <el-input
          v-model="queryParams.tpBvz"
          placeholder="请输入BVZ"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="BVJ" prop="tpBvj">
        <el-input
          v-model="queryParams.tpBvj"
          placeholder="请输入BVJ"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="BFd" prop="tpBfd">
        <el-input
          v-model="queryParams.tpBfd"
          placeholder="请输入BFd"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="BFZ" prop="tpBfz">
        <el-input
          v-model="queryParams.tpBfz"
          placeholder="请输入BFZ"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="BFJ" prop="tpBfj">
        <el-input
          v-model="queryParams.tpBfj"
          placeholder="请输入BFJ"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="KHd" prop="tpKhd">
        <el-input
          v-model="queryParams.tpKhd"
          placeholder="请输入KHd"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="KPd" prop="tpKpd">
        <el-input
          v-model="queryParams.tpKpd"
          placeholder="请输入KPd"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="KPM" prop="tpKpm">
        <el-input
          v-model="queryParams.tpKpm"
          placeholder="请输入KPM"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="DHd" prop="tpDhd">
        <el-input
          v-model="queryParams.tpDhd"
          placeholder="请输入DHd"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="DPd" prop="tpDpd">
        <el-input
          v-model="queryParams.tpDpd"
          placeholder="请输入DPd"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="DPM" prop="tpDpm">
        <el-input
          v-model="queryParams.tpDpm"
          placeholder="请输入DPM"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="DNd" prop="tpDndd">
        <el-input
          v-model="queryParams.tpDndd"
          placeholder="请输入DNd"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="DNM" prop="tpDnm">
        <el-input
          v-model="queryParams.tpDnm"
          placeholder="请输入DNM"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="DND" prop="tpDnd">
        <el-input
          v-model="queryParams.tpDnd"
          placeholder="请输入DND"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="DNt" prop="tpDnt">
        <el-input
          v-model="queryParams.tpDnt"
          placeholder="请输入DNt"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="DCd" prop="tpDcdd">
        <el-input
          v-model="queryParams.tpDcdd"
          placeholder="请输入DCd"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="DCM" prop="tpDcm">
        <el-input
          v-model="queryParams.tpDcm"
          placeholder="请输入DCM"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="DCD" prop="tpDcd">
        <el-input
          v-model="queryParams.tpDcd"
          placeholder="请输入DCD"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="DCt" prop="tpDct">
        <el-input
          v-model="queryParams.tpDct"
          placeholder="请输入DCt"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['hualian:pulley:add']"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['hualian:pulley:edit']"
        >修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['hualian:pulley:remove']"
        >删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['hualian:pulley:export']"
        >导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="pulleyList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="同步轮id" align="center" prop="tpId" />
      <el-table-column label="同步轮类型" align="center" prop="tpType" />
      <el-table-column label="同步轮材质" align="center" prop="tpMaterial" />
      <el-table-column label="同步轮齿形带宽" align="center" prop="tpToothBandwidth" />
      <el-table-column label="同步轮齿数" align="center" prop="tpTeethNum" />
      <el-table-column label="同步轮形状" align="center" prop="tpShape" />
      <el-table-column label="同步轮轴孔类型" align="center" prop="tpAxleHoleType" />
      <el-table-column label="PD" align="center" prop="tpPd" />
      <el-table-column label="OD" align="center" prop="tpOd" />
      <el-table-column label="mind" align="center" prop="tpMinD" />
      <el-table-column label="maxd" align="center" prop="tpMaxD" />
      <el-table-column label="D" align="center" prop="tpD" />
      <el-table-column label="F" align="center" prop="tpF" />
      <el-table-column label="E" align="center" prop="tpE" />
      <el-table-column label="t" align="center" prop="tpT" />
      <el-table-column label="DE" align="center" prop="tpDe" />
      <el-table-column label="AHd" align="center" prop="tpAhd" />
      <el-table-column label="APd" align="center" prop="tpApd" />
      <el-table-column label="APM" align="center" prop="tpApm" />
      <el-table-column label="ANd" align="center" prop="tpAnd" />
      <el-table-column label="ANM" align="center" prop="tpAnm" />
      <el-table-column label="ANb" align="center" prop="tpAnb" />
      <el-table-column label="ANt" align="center" prop="tpAnt" />
      <el-table-column label="ACd" align="center" prop="tpAcd" />
      <el-table-column label="ACM" align="center" prop="tpAcm" />
      <el-table-column label="ACb" align="center" prop="tpAcb" />
      <el-table-column label="ACt" align="center" prop="tpAct" />
      <el-table-column label="AVd" align="center" prop="tpAvd" />
      <el-table-column label="AVZ" align="center" prop="tpAvz" />
      <el-table-column label="AVJ" align="center" prop="tpAvj" />
      <el-table-column label="AYd" align="center" prop="tpAyd" />
      <el-table-column label="AYQ" align="center" prop="tpAyq" />
      <el-table-column label="AYR" align="center" prop="tpAyr" />
      <el-table-column label="AYS" align="center" prop="tpAys" />
      <el-table-column label="AYT" align="center" prop="tpAyt" />
      <el-table-column label="AWBd" align="center" prop="tpAwbd" />
      <el-table-column label="AWBQ" align="center" prop="tpAwbq" />
      <el-table-column label="AWBR" align="center" prop="tpAwbr" />
      <el-table-column label="AWBS" align="center" prop="tpAwbs" />
      <el-table-column label="AWBT" align="center" prop="tpAwbt" />
      <el-table-column label="BHd" align="center" prop="tpBhd" />
      <el-table-column label="BPd" align="center" prop="tpBpd" />
      <el-table-column label="BPM" align="center" prop="tpBpm" />
      <el-table-column label="BNd" align="center" prop="tpBnd" />
      <el-table-column label="BNM" align="center" prop="tpBnm" />
      <el-table-column label="BNb" align="center" prop="tpBnb" />
      <el-table-column label="BNt" align="center" prop="tpBnt" />
      <el-table-column label="BCd" align="center" prop="tpBcd" />
      <el-table-column label="BCM" align="center" prop="tpBcm" />
      <el-table-column label="BCb" align="center" prop="tpBcb" />
      <el-table-column label="BCt" align="center" prop="tpBct" />
      <el-table-column label="BVd" align="center" prop="tpBvd" />
      <el-table-column label="BVZ" align="center" prop="tpBvz" />
      <el-table-column label="BVJ" align="center" prop="tpBvj" />
      <el-table-column label="BFd" align="center" prop="tpBfd" />
      <el-table-column label="BFZ" align="center" prop="tpBfz" />
      <el-table-column label="BFJ" align="center" prop="tpBfj" />
      <el-table-column label="KHd" align="center" prop="tpKhd" />
      <el-table-column label="KPd" align="center" prop="tpKpd" />
      <el-table-column label="KPM" align="center" prop="tpKpm" />
      <el-table-column label="DHd" align="center" prop="tpDhd" />
      <el-table-column label="DPd" align="center" prop="tpDpd" />
      <el-table-column label="DPM" align="center" prop="tpDpm" />
      <el-table-column label="DNd" align="center" prop="tpDndd" />
      <el-table-column label="DNM" align="center" prop="tpDnm" />
      <el-table-column label="DND" align="center" prop="tpDnd" />
      <el-table-column label="DNt" align="center" prop="tpDnt" />
      <el-table-column label="DCd" align="center" prop="tpDcdd" />
      <el-table-column label="DCM" align="center" prop="tpDcm" />
      <el-table-column label="DCD" align="center" prop="tpDcd" />
      <el-table-column label="DCt" align="center" prop="tpDct" />
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['hualian:pulley:edit']"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['hualian:pulley:remove']"
          >删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改同步轮对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="同步轮材质" prop="tpMaterial">
          <el-input v-model="form.tpMaterial" placeholder="请输入同步轮材质" />
        </el-form-item>
        <el-form-item label="同步轮齿形带宽" prop="tpToothBandwidth">
          <el-input v-model="form.tpToothBandwidth" placeholder="请输入同步轮齿形带宽" />
        </el-form-item>
        <el-form-item label="同步轮齿数" prop="tpTeethNum">
          <el-input v-model="form.tpTeethNum" placeholder="请输入同步轮齿数" />
        </el-form-item>
        <el-form-item label="同步轮形状" prop="tpShape">
          <el-input v-model="form.tpShape" placeholder="请输入同步轮形状" />
        </el-form-item>
        <el-form-item label="PD" prop="tpPd">
          <el-input v-model="form.tpPd" placeholder="请输入PD" />
        </el-form-item>
        <el-form-item label="OD" prop="tpOd">
          <el-input v-model="form.tpOd" placeholder="请输入OD" />
        </el-form-item>
        <el-form-item label="mind" prop="tpMinD">
          <el-input v-model="form.tpMinD" placeholder="请输入mind" />
        </el-form-item>
        <el-form-item label="maxd" prop="tpMaxD">
          <el-input v-model="form.tpMaxD" placeholder="请输入maxd" />
        </el-form-item>
        <el-form-item label="D" prop="tpD">
          <el-input v-model="form.tpD" placeholder="请输入D" />
        </el-form-item>
        <el-form-item label="F" prop="tpF">
          <el-input v-model="form.tpF" placeholder="请输入F" />
        </el-form-item>
        <el-form-item label="E" prop="tpE">
          <el-input v-model="form.tpE" placeholder="请输入E" />
        </el-form-item>
        <el-form-item label="t" prop="tpT">
          <el-input v-model="form.tpT" placeholder="请输入t" />
        </el-form-item>
        <el-form-item label="DE" prop="tpDe">
          <el-input v-model="form.tpDe" placeholder="请输入DE" />
        </el-form-item>
        <el-form-item label="AHd" prop="tpAhd">
          <el-input v-model="form.tpAhd" placeholder="请输入AHd" />
        </el-form-item>
        <el-form-item label="APd" prop="tpApd">
          <el-input v-model="form.tpApd" placeholder="请输入APd" />
        </el-form-item>
        <el-form-item label="APM" prop="tpApm">
          <el-input v-model="form.tpApm" placeholder="请输入APM" />
        </el-form-item>
        <el-form-item label="ANd" prop="tpAnd">
          <el-input v-model="form.tpAnd" placeholder="请输入ANd" />
        </el-form-item>
        <el-form-item label="ANM" prop="tpAnm">
          <el-input v-model="form.tpAnm" placeholder="请输入ANM" />
        </el-form-item>
        <el-form-item label="ANb" prop="tpAnb">
          <el-input v-model="form.tpAnb" placeholder="请输入ANb" />
        </el-form-item>
        <el-form-item label="ANt" prop="tpAnt">
          <el-input v-model="form.tpAnt" placeholder="请输入ANt" />
        </el-form-item>
        <el-form-item label="ACd" prop="tpAcd">
          <el-input v-model="form.tpAcd" placeholder="请输入ACd" />
        </el-form-item>
        <el-form-item label="ACM" prop="tpAcm">
          <el-input v-model="form.tpAcm" placeholder="请输入ACM" />
        </el-form-item>
        <el-form-item label="ACb" prop="tpAcb">
          <el-input v-model="form.tpAcb" placeholder="请输入ACb" />
        </el-form-item>
        <el-form-item label="ACt" prop="tpAct">
          <el-input v-model="form.tpAct" placeholder="请输入ACt" />
        </el-form-item>
        <el-form-item label="AVd" prop="tpAvd">
          <el-input v-model="form.tpAvd" placeholder="请输入AVd" />
        </el-form-item>
        <el-form-item label="AVZ" prop="tpAvz">
          <el-input v-model="form.tpAvz" placeholder="请输入AVZ" />
        </el-form-item>
        <el-form-item label="AVJ" prop="tpAvj">
          <el-input v-model="form.tpAvj" placeholder="请输入AVJ" />
        </el-form-item>
        <el-form-item label="AYd" prop="tpAyd">
          <el-input v-model="form.tpAyd" placeholder="请输入AYd" />
        </el-form-item>
        <el-form-item label="AYQ" prop="tpAyq">
          <el-input v-model="form.tpAyq" placeholder="请输入AYQ" />
        </el-form-item>
        <el-form-item label="AYR" prop="tpAyr">
          <el-input v-model="form.tpAyr" placeholder="请输入AYR" />
        </el-form-item>
        <el-form-item label="AYS" prop="tpAys">
          <el-input v-model="form.tpAys" placeholder="请输入AYS" />
        </el-form-item>
        <el-form-item label="AYT" prop="tpAyt">
          <el-input v-model="form.tpAyt" placeholder="请输入AYT" />
        </el-form-item>
        <el-form-item label="AWBd" prop="tpAwbd">
          <el-input v-model="form.tpAwbd" placeholder="请输入AWBd" />
        </el-form-item>
        <el-form-item label="AWBQ" prop="tpAwbq">
          <el-input v-model="form.tpAwbq" placeholder="请输入AWBQ" />
        </el-form-item>
        <el-form-item label="AWBR" prop="tpAwbr">
          <el-input v-model="form.tpAwbr" placeholder="请输入AWBR" />
        </el-form-item>
        <el-form-item label="AWBS" prop="tpAwbs">
          <el-input v-model="form.tpAwbs" placeholder="请输入AWBS" />
        </el-form-item>
        <el-form-item label="AWBT" prop="tpAwbt">
          <el-input v-model="form.tpAwbt" placeholder="请输入AWBT" />
        </el-form-item>
        <el-form-item label="BHd" prop="tpBhd">
          <el-input v-model="form.tpBhd" placeholder="请输入BHd" />
        </el-form-item>
        <el-form-item label="BPd" prop="tpBpd">
          <el-input v-model="form.tpBpd" placeholder="请输入BPd" />
        </el-form-item>
        <el-form-item label="BPM" prop="tpBpm">
          <el-input v-model="form.tpBpm" placeholder="请输入BPM" />
        </el-form-item>
        <el-form-item label="BNd" prop="tpBnd">
          <el-input v-model="form.tpBnd" placeholder="请输入BNd" />
        </el-form-item>
        <el-form-item label="BNM" prop="tpBnm">
          <el-input v-model="form.tpBnm" placeholder="请输入BNM" />
        </el-form-item>
        <el-form-item label="BNb" prop="tpBnb">
          <el-input v-model="form.tpBnb" placeholder="请输入BNb" />
        </el-form-item>
        <el-form-item label="BNt" prop="tpBnt">
          <el-input v-model="form.tpBnt" placeholder="请输入BNt" />
        </el-form-item>
        <el-form-item label="BCd" prop="tpBcd">
          <el-input v-model="form.tpBcd" placeholder="请输入BCd" />
        </el-form-item>
        <el-form-item label="BCM" prop="tpBcm">
          <el-input v-model="form.tpBcm" placeholder="请输入BCM" />
        </el-form-item>
        <el-form-item label="BCb" prop="tpBcb">
          <el-input v-model="form.tpBcb" placeholder="请输入BCb" />
        </el-form-item>
        <el-form-item label="BCt" prop="tpBct">
          <el-input v-model="form.tpBct" placeholder="请输入BCt" />
        </el-form-item>
        <el-form-item label="BVd" prop="tpBvd">
          <el-input v-model="form.tpBvd" placeholder="请输入BVd" />
        </el-form-item>
        <el-form-item label="BVZ" prop="tpBvz">
          <el-input v-model="form.tpBvz" placeholder="请输入BVZ" />
        </el-form-item>
        <el-form-item label="BVJ" prop="tpBvj">
          <el-input v-model="form.tpBvj" placeholder="请输入BVJ" />
        </el-form-item>
        <el-form-item label="BFd" prop="tpBfd">
          <el-input v-model="form.tpBfd" placeholder="请输入BFd" />
        </el-form-item>
        <el-form-item label="BFZ" prop="tpBfz">
          <el-input v-model="form.tpBfz" placeholder="请输入BFZ" />
        </el-form-item>
        <el-form-item label="BFJ" prop="tpBfj">
          <el-input v-model="form.tpBfj" placeholder="请输入BFJ" />
        </el-form-item>
        <el-form-item label="KHd" prop="tpKhd">
          <el-input v-model="form.tpKhd" placeholder="请输入KHd" />
        </el-form-item>
        <el-form-item label="KPd" prop="tpKpd">
          <el-input v-model="form.tpKpd" placeholder="请输入KPd" />
        </el-form-item>
        <el-form-item label="KPM" prop="tpKpm">
          <el-input v-model="form.tpKpm" placeholder="请输入KPM" />
        </el-form-item>
        <el-form-item label="DHd" prop="tpDhd">
          <el-input v-model="form.tpDhd" placeholder="请输入DHd" />
        </el-form-item>
        <el-form-item label="DPd" prop="tpDpd">
          <el-input v-model="form.tpDpd" placeholder="请输入DPd" />
        </el-form-item>
        <el-form-item label="DPM" prop="tpDpm">
          <el-input v-model="form.tpDpm" placeholder="请输入DPM" />
        </el-form-item>
        <el-form-item label="DNd" prop="tpDndd">
          <el-input v-model="form.tpDndd" placeholder="请输入DNd" />
        </el-form-item>
        <el-form-item label="DNM" prop="tpDnm">
          <el-input v-model="form.tpDnm" placeholder="请输入DNM" />
        </el-form-item>
        <el-form-item label="DND" prop="tpDnd">
          <el-input v-model="form.tpDnd" placeholder="请输入DND" />
        </el-form-item>
        <el-form-item label="DNt" prop="tpDnt">
          <el-input v-model="form.tpDnt" placeholder="请输入DNt" />
        </el-form-item>
        <el-form-item label="DCd" prop="tpDcdd">
          <el-input v-model="form.tpDcdd" placeholder="请输入DCd" />
        </el-form-item>
        <el-form-item label="DCM" prop="tpDcm">
          <el-input v-model="form.tpDcm" placeholder="请输入DCM" />
        </el-form-item>
        <el-form-item label="DCD" prop="tpDcd">
          <el-input v-model="form.tpDcd" placeholder="请输入DCD" />
        </el-form-item>
        <el-form-item label="DCt" prop="tpDct">
          <el-input v-model="form.tpDct" placeholder="请输入DCt" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { listPulley, getPulley, delPulley, addPulley, updatePulley } from "@/api/hualian/pulley";

export default {
  name: "Pulley",
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 同步轮表格数据
      pulleyList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        tpType: null,
        tpMaterial: null,
        tpToothBandwidth: null,
        tpTeethNum: null,
        tpShape: null,
        tpAxleHoleType: null,
        tpPd: null,
        tpOd: null,
        tpMinD: null,
        tpMaxD: null,
        tpD: null,
        tpF: null,
        tpE: null,
        tpT: null,
        tpDe: null,
        tpAhd: null,
        tpApd: null,
        tpApm: null,
        tpAnd: null,
        tpAnm: null,
        tpAnb: null,
        tpAnt: null,
        tpAcd: null,
        tpAcm: null,
        tpAcb: null,
        tpAct: null,
        tpAvd: null,
        tpAvz: null,
        tpAvj: null,
        tpAyd: null,
        tpAyq: null,
        tpAyr: null,
        tpAys: null,
        tpAyt: null,
        tpAwbd: null,
        tpAwbq: null,
        tpAwbr: null,
        tpAwbs: null,
        tpAwbt: null,
        tpBhd: null,
        tpBpd: null,
        tpBpm: null,
        tpBnd: null,
        tpBnm: null,
        tpBnb: null,
        tpBnt: null,
        tpBcd: null,
        tpBcm: null,
        tpBcb: null,
        tpBct: null,
        tpBvd: null,
        tpBvz: null,
        tpBvj: null,
        tpBfd: null,
        tpBfz: null,
        tpBfj: null,
        tpKhd: null,
        tpKpd: null,
        tpKpm: null,
        tpDhd: null,
        tpDpd: null,
        tpDpm: null,
        tpDndd: null,
        tpDnm: null,
        tpDnd: null,
        tpDnt: null,
        tpDcdd: null,
        tpDcm: null,
        tpDcd: null,
        tpDct: null
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询同步轮列表 */
    getList() {
      this.loading = true;
      listPulley(this.queryParams).then(response => {
        this.pulleyList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        tpId: null,
        tpType: null,
        tpMaterial: null,
        tpToothBandwidth: null,
        tpTeethNum: null,
        tpShape: null,
        tpAxleHoleType: null,
        tpPd: null,
        tpOd: null,
        tpMinD: null,
        tpMaxD: null,
        tpD: null,
        tpF: null,
        tpE: null,
        tpT: null,
        tpDe: null,
        tpAhd: null,
        tpApd: null,
        tpApm: null,
        tpAnd: null,
        tpAnm: null,
        tpAnb: null,
        tpAnt: null,
        tpAcd: null,
        tpAcm: null,
        tpAcb: null,
        tpAct: null,
        tpAvd: null,
        tpAvz: null,
        tpAvj: null,
        tpAyd: null,
        tpAyq: null,
        tpAyr: null,
        tpAys: null,
        tpAyt: null,
        tpAwbd: null,
        tpAwbq: null,
        tpAwbr: null,
        tpAwbs: null,
        tpAwbt: null,
        tpBhd: null,
        tpBpd: null,
        tpBpm: null,
        tpBnd: null,
        tpBnm: null,
        tpBnb: null,
        tpBnt: null,
        tpBcd: null,
        tpBcm: null,
        tpBcb: null,
        tpBct: null,
        tpBvd: null,
        tpBvz: null,
        tpBvj: null,
        tpBfd: null,
        tpBfz: null,
        tpBfj: null,
        tpKhd: null,
        tpKpd: null,
        tpKpm: null,
        tpDhd: null,
        tpDpd: null,
        tpDpm: null,
        tpDndd: null,
        tpDnm: null,
        tpDnd: null,
        tpDnt: null,
        tpDcdd: null,
        tpDcm: null,
        tpDcd: null,
        tpDct: null
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.tpId)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加同步轮";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const tpId = row.tpId || this.ids
      getPulley(tpId).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改同步轮";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.tpId != null) {
            updatePulley(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addPulley(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const tpIds = row.tpId || this.ids;
      this.$modal.confirm('是否确认删除同步轮编号为"' + tpIds + '"的数据项？').then(function() {
        return delPulley(tpIds);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('hualian/pulley/export', {
        ...this.queryParams
      }, `pulley_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>
